<template>
	<view >
		<view class="head-filter flex-a ju-bt padlr24 padtb20 bg-f">
			<view 
				class="filter-li filter-l flex-a"
			>
				<view class="flex-a">
					<text class="mar-r6">全部</text>
					<u-icon 
						name="arrow-down-fill" 
						color="#111111" 
						size="24rpx"
						top="1"
					></u-icon>
				</view>
				<view class="flex-a mar-l64">
					<text class="mar-r6">综合排序</text>
					<u-icon 
						name="arrow-down-fill" 
						color="#111111" 
						size="24rpx"
						top="1"
					></u-icon>
				</view>
			</view>
			<view class="filter-li filter-r flex-a" @click="showList = !showList">
				<text>显示</text>
				<view class="" v-show="!showList">
					<u--image
						:showLoading="true" 
						:src="getImg('row-icon')" 
						width="36rpx" 
						height="36rpx"
					></u--image>
				</view>
				<view class="" v-show="showList">
					<u--image
						:showLoading="true" 
						:src="getImg('col-icon')" 
						width="36rpx" 
						height="36rpx"
					></u--image>
				</view>
			</view>
		</view>
		<view class="list flex flex-wrap padlr20" v-if="!showList">
			<view 
				class="list-li mar-t16" 
				v-for="(item, index) in 10"
				:key="index"
				@click="goDetail(item)"
			>
				<view class="li-item bg-f ">
					<view class="h-342">
						<u--image
							:showLoading="true" 
							src="" 
							width="100%" 
							height="342rpx"
						></u--image>
					</view>
					<view class="pad14">
						<view class="item-title">
							超声刀脸+眼
						</view>
						<view class="item-price flex-a ju-bt mar-t20">
							<view class="price-info">
								<text class="f-s16">￥</text>
								<text class="price-num f-s34">179.00</text>
								<text class="price-origin" v-if="!index">
									<text class="f-s16">￥</text>
									<text>13600</text>
								</text>
							</view>
							<view class="item-quantity-sold">
								已售 0
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="list-col " v-show="showList">
			<view 
				class="list-li mar-t10 pad24 bg-f flex" 
				v-for="(item, index) in 10"
				:key="index"
			>
				<view class="wh-156">
					<u--image
						:showLoading="true" 
						src="" 
						width="156rpx" 
						height="156rpx"
						radius="4rpx"
					></u--image>
				</view>
				<view class="li-r pad-l14 flex-col ju-bt  ">
					<view class="">
						<view class="item-title">
							以色列非凡蛋白光-美白嫩肤
						</view>
						<view class="item-quantity-sold flex-a mar-t14">
							<view class="mar-r16">
								已售99
							</view>
							<view class="">
								库存101
							</view>
						</view>
					</view>
					<view class="item-price flex-a ju-bt mar-t20">
						<view class="price-info">
							<text >￥</text>
							<text class="price-num f-s42">980</text>
							<text class="price-origin mar-l14 " >
								<text >￥</text>
								<text>1980</text>
							</text>
						</view>
						
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "", // 首页全部
		data() {
			return {
				showList: false,
			}
		},
		methods: {
			goDetail(eve) {
				uni.navigateTo({
					url: "/pages/index/pages/goodsDetail/goodsDetail"
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.list-col {
		.list-li {
			.li-r {
				width: calc(100% - 156rpx);
				.item-title {
					font-family: MiSans, MiSans;
					font-weight: bold;
					font-size: 28rpx;
					color: #000000;
					line-height: 33rpx;
				}
				.item-quantity-sold {
					font-family: MiSans, MiSans;
					font-weight: 400;
					font-size: 26rpx;
					color: #666666;
					line-height: 30rpx;
				}
			}
		}
	}
	.item-price {
		.item-quantity-sold {
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
		}
		.price-info {
			color: #FF7171;
			font-size: 24rpx;
			.price-num {
				font-weight: 600;
			}
			.price-origin {
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
				text-decoration: line-through;
			}
		}
	} 
	.list {
		.list-li {
			width: 50%;
			&:nth-child(odd){
				padding-right: 10rpx;
			} //奇数行
			
			&:nth-child(even){
				padding-left: 10rpx;
			}
		}
		
	}
	.head-filter {
		.filter-li {
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			color: #111111;
			line-height: 33rpx;
			text-align: center;
		}
		.filter-r {
			color: #666666;
		}
	}
</style>